import { createApp } from 'vue';
import { createPinia } from 'pinia';
import piniaPersist from "pinia-plugin-persistedstate";
import ElementPlus from 'element-plus';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import 'element-plus/theme-chalk/index.css';
import App from './App.vue';
import router from './router/index';

const app = createApp(App)

const pinia = createPinia()
pinia.use(piniaPersist);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.use(ElementPlus)
app.use(router)
app.use(pinia)
app.mount('#app')
